import java.util.Random;
import java.util.Scanner;

public class GuessNumber {
  public static void main(String[] args) {
    Random r = new Random();
    int num = r.nextInt(100) + 1;
    Scanner sc = new Scanner(System.in);
    for (int i = 0; i < 100; i++) {
    System.out.println("请猜一个1-100之间的整数:");
    int gessnum = sc.nextInt();
      if (gessnum > num) {
        System.out.println("你猜得太大了！请重试");
      } else if (gessnum < num) {
        System.out.println("你猜得太小了！请重试");
      } else {
        System.out.println("恭喜你，你猜对啦！");
      }
    }
  }
}
